﻿namespace Offy.Itdev.BuyIn.Intranet.Console.Test
{
    using Microsoft.SharePoint;
    using Services.Contracts;
    using Services.Impl;
    using System;
    using Services.Domains;

    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                using (var site = new SPSite("http://vmh-buyin"))
                {
                    using (var web = site.OpenWeb())
                    {
                        //IProductService service = new ProductService();
                        IProductService service2 = new ProductService(web);
                        var list = service2.GetProductList();
                        foreach (Product product in list)
                        {
                            Console.WriteLine(product.ID);
                        }
                    }
                }
            }
            catch (Exception ex)
            {
            }
        }
    }
}
